
// bp-111View.cpp : implementation of the Cbp111View class
//

#include "stdafx.h"
#include "bp-111.h"

#include "bp-111Doc.h"
#include "bp-111View.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// Cbp111View

IMPLEMENT_DYNCREATE(Cbp111View, CView)

BEGIN_MESSAGE_MAP(Cbp111View, CView)
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &Cbp111View::OnFilePrintPreview)
END_MESSAGE_MAP()

// Cbp111View construction/destruction

Cbp111View::Cbp111View()
{
	// TODO: add construction code here

}

Cbp111View::~Cbp111View()
{
}

BOOL Cbp111View::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

// Cbp111View drawing

void Cbp111View::OnDraw(CDC* /*pDC*/)
{
	Cbp111Doc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;

	// TODO: add draw code for native data here
}


// Cbp111View printing


void Cbp111View::OnFilePrintPreview()
{
	AFXPrintPreview(this);
}

BOOL Cbp111View::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void Cbp111View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void Cbp111View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

void Cbp111View::OnRButtonUp(UINT nFlags, CPoint point)
{
	ClientToScreen(&point);
	OnContextMenu(this, point);
}

void Cbp111View::OnContextMenu(CWnd* pWnd, CPoint point)
{
	theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EDIT, point.x, point.y, this, TRUE);
}


// Cbp111View diagnostics

#ifdef _DEBUG
void Cbp111View::AssertValid() const
{
	CView::AssertValid();
}

void Cbp111View::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

Cbp111Doc* Cbp111View::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cbp111Doc)));
	return (Cbp111Doc*)m_pDocument;
}
#endif //_DEBUG


// Cbp111View message handlers
